﻿using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;

namespace RockBus.DataContracts
{
    [MessageContract(WrapperNamespace = StringConstants.RockBusNamespace)]
    public class RemoveSubscribersRequest
    {
        public RemoveSubscribersRequest()
        {
            this.SubscriberIds = new List<string>();
        }

        public RemoveSubscribersRequest(string subscriberId)
            : this()
        {
            this.SubscriberIds.Add(subscriberId);
        }

        public RemoveSubscribersRequest(IEnumerable<string> subscriberIds)
            : this()
        {
            ((List<string>)this.SubscriberIds).AddRange(subscriberIds);
        }

        [MessageBodyMember]
        public ICollection<string> SubscriberIds { get; private set; }

        public RemoveSubscribersRequest CreateRemoveSubscribersRequest()
        {
            return new RemoveSubscribersRequest(this.SubscriberIds);
        }
    }

    [MessageContract(WrapperNamespace = StringConstants.RemoveAllSubscribersAction)]
    public class RemoveAllSubscribersRequest
    {
    }
}